import {Injectable} from '@angular/core';
import {HttpClient, HttpParams} from '@angular/common/http';
import {Observable} from 'rxjs';
import {Env} from '../../../environments/Env';

@Injectable({
  providedIn: 'root'
})
export class LifeService {

  constructor(private http: HttpClient) {
  }

  public getDiaryList(): Observable<any> {
    return this.http.get(`${Env.getDomain()}/blog/life/findAll`);
  }

  getDiaryDetail(params: HttpParams) {
    return this.http.get(`${Env.getDomain()}/blog/life/find`, {params});
  }
}
